package cn.edu.henu.team.database;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import cn.edu.henu.team.table.diagLog;
import cn.edu.henu.team.table.examinations;
import cn.edu.henu.team.table.health_f;
import cn.edu.henu.team.table.health_p;

import cn.edu.henu.team.database.diagLogDao;
import cn.edu.henu.team.database.examinationsDao;
import cn.edu.henu.team.database.health_fDao;
import cn.edu.henu.team.database.health_pDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig diagLogDaoConfig;
    private final DaoConfig examinationsDaoConfig;
    private final DaoConfig health_fDaoConfig;
    private final DaoConfig health_pDaoConfig;

    private final diagLogDao diagLogDao;
    private final examinationsDao examinationsDao;
    private final health_fDao health_fDao;
    private final health_pDao health_pDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        diagLogDaoConfig = daoConfigMap.get(diagLogDao.class).clone();
        diagLogDaoConfig.initIdentityScope(type);

        examinationsDaoConfig = daoConfigMap.get(examinationsDao.class).clone();
        examinationsDaoConfig.initIdentityScope(type);

        health_fDaoConfig = daoConfigMap.get(health_fDao.class).clone();
        health_fDaoConfig.initIdentityScope(type);

        health_pDaoConfig = daoConfigMap.get(health_pDao.class).clone();
        health_pDaoConfig.initIdentityScope(type);

        diagLogDao = new diagLogDao(diagLogDaoConfig, this);
        examinationsDao = new examinationsDao(examinationsDaoConfig, this);
        health_fDao = new health_fDao(health_fDaoConfig, this);
        health_pDao = new health_pDao(health_pDaoConfig, this);

        registerDao(diagLog.class, diagLogDao);
        registerDao(examinations.class, examinationsDao);
        registerDao(health_f.class, health_fDao);
        registerDao(health_p.class, health_pDao);
    }
    
    public void clear() {
        diagLogDaoConfig.clearIdentityScope();
        examinationsDaoConfig.clearIdentityScope();
        health_fDaoConfig.clearIdentityScope();
        health_pDaoConfig.clearIdentityScope();
    }

    public diagLogDao getDiagLogDao() {
        return diagLogDao;
    }

    public examinationsDao getExaminationsDao() {
        return examinationsDao;
    }

    public health_fDao getHealth_fDao() {
        return health_fDao;
    }

    public health_pDao getHealth_pDao() {
        return health_pDao;
    }

}
